<div class="container-fluid" style="margin-top: 10px;">

    <div class="row">
        <form id="condition-form" class="mt10" method="post" action="addConditionSession" enctype="multipart/form-data">
            <div class="col-xs-12" >
                {:Form('text',['title'=>'家具编号','name'=>'FURN_NO','value'=>$Think.session.list_condition_furn.FURN_NO,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'家具名称','name'=>'FURN_NAME','value'=>$Think.session.list_condition_furn.FURN_NAME,'col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'分类号','name'=>'FURNTYPE_NO','value'=>$Think.session.list_condition_furn.FURNTYPE_NO,'url'=>'dict/getFurnType','key'=>'FACITYPE_ID','field'=>'FACITYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'国有资产分类','name'=>'ASSET_TYPE_ID','value'=>$Think.session.list_condition_furn.ASSET_TYPE_ID,'url'=>'dict/getFurnAssetType','key'=>'ID','field'=>'NAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'国标','name'=>'GB','value'=>$Think.session.list_condition_furn.GB,'url'=>'dict/getFurnGB','key'=>'GBCODE','field'=>'NAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'当前状态','name'=>'STATE_ID','value'=>$Think.session.list_condition_furn.STATE_ID,'url'=>'dict/getFurnState','key'=>'STATE_ID','field'=>'STATE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'隶属单位','name'=>'BELONG_ID','value'=>$Think.session.list_condition_furn.BELONG_ID,'url'=>'dict/getBelongList','key'=>'BELONG_ID','field'=>'BELONG','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用单位','name'=>'DEPART_ID','value'=>$Think.session.list_condition_furn.DEPART_ID,'url'=>'dict/getDepartment','key'=>'DEPART_ID','field'=>'DEPART_SHORT','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'国别','name'=>'COUNTRY_ID','value'=>$Think.session.list_condition_furn.COUNTRY_ID,'url'=>'dict/getCountry','key'=>'ID','field'=>'NAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'是否批量采购','name'=>'MUTI_BUY_MARK','value'=>$Think.session.list_condition_furn.MUTI_BUY_MARK,'url'=>'dict/getIsOrNot','key'=>'ID','field'=>'NAME','col'=>'col-xs-12'])}
                {:Form('text',['title'=>'品牌','name'=>'BRAND','value'=>$Think.session.list_condition_furn.BRAND,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'型号','name'=>'MODEL','value'=>$Think.session.list_condition_furn.MODEL,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'厂商','name'=>'FACTORY','value'=>$Think.session.list_condition_furn.FACTORY,'col'=>'col-xs-12'])}

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                价格 从
                            </span>
                        <input name="PRICE_START"  value="{$Think.session.list_condition_furn.PRICE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="PRICE_END"  value="{$Think.session.list_condition_furn.PRICE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                出厂日期 从
                            </span>
                        <input name="FACTORY_DATE_START"  value="{$Think.session.list_condition_furn.FACTORY_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="FACTORY_DATE_END"  value="{$Think.session.list_condition_furn.FACTORY_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                购置日期 从
                            </span>
                        <input name="GET_DATE_START"  value="{$Think.session.list_condition_furn.GET_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="GET_DATE_END"  value="{$Think.session.list_condition_furn.GET_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                入账时间 从
                            </span>
                        <input name="ENTER_TIME_START"  value="{$Think.session.list_condition_furn.ENTER_TIME_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="ENTER_TIME_END"  value="{$Think.session.list_condition_furn.ENTER_TIME_END}"  type="text" class="form-control">

                    </div>
                </div>


            </div>
            <div class="col-xs-12" style="margin-top: 30px;text-align: center">
                <button onclick="search()" type="button" class="btn btn-info">查询</button>
                <button type="reset" class="btn btn-default" >重置</button>
                <button type="button" onclick="resetAll()" class="btn btn-danger" >清空</button>
            </div>
        </form>
    </div>
</div>

<script>
    $(function () {
        $("[name='FACTORY_DATE_START']").flatpickr();
        $("[name='FACTORY_DATE_END']").flatpickr();
        $("[name='GET_DATE_START']").flatpickr();
        $("[name='GET_DATE_END']").flatpickr();
        $("[name='ENTER_TIME_START']").flatpickr();
        $("[name='ENTER_TIME_END']").flatpickr();
    })
    function search() {
        $("#condition-form").ajaxSubmit(function (res) {
            console.log(res)
            var json = JSON.parse(res);
            if (json['code']=='200') {
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
                parent.refreshTable();
            }
        })
    }
    function resetAll() {
        $(':input','#condition-form')
            .not(':button, :submit, :reset, :hidden')
            .val('')
            .removeAttr('checked')
            .removeAttr('selected');
    }

</script>